import { defineStore } from 'pinia'
import { ref } from 'vue'
const useAgeStore = defineStore('age', () => {
    const age = ref(20)
    const updateage = () => age.value = age.value + 1
    return { age, updateage }
}, {
    persist: {
        enabled: true,
        strategies: [
            {
                key: 'age',
                storage: localStorage
            }
        ]
    }
})

export default useAgeStore;